package com.example.abe.diandi.util;

import android.app.Activity;
import android.support.v4.app.Fragment;

/**
 * Created by abe on 17/8/26.
 * 判空工具类
 */
public class NullUtil {

    public static boolean isNullActivity(Object object){
        if (object instanceof Activity){
            return false;
        }
        return true;
    }

    public static boolean isNullFragment(Object object){
        if (object instanceof Fragment){
            return false;
        }
        return true;
    }

    public static boolean isEmptyString(String string){
        if (string != null && !string.isEmpty()){
            return false;
        }
        return true;
    }
}
